<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>lwIP: MIB2 statistics</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">lwIP
   &#160;<span id="projectnumber">2.1.2</span>
   </div>
   <div id="projectbrief">Lightweight IP stack</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('group__netif__mib2.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#define-members">Macros</a> &#124;
<a href="#enum-members">Enumerations</a>  </div>
  <div class="headertitle">
<div class="title">MIB2 statistics<div class="ingroups"><a class="el" href="group__api.html">APIs</a> &raquo; <a class="el" href="group__callbackstyle__api.html">&quot;raw&quot; APIs</a> &raquo; <a class="el" href="group__netif.html">Network interface (NETIF)</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structstats__mib2__netif__ctrs.html">stats_mib2_netif_ctrs</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:ga3c52caf566d37705c6547f2d025afd9f"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__netif__mib2.html#ga3c52caf566d37705c6547f2d025afd9f">MIB2_STATS_NETIF_INC</a>(n,  x)&#160;&#160;&#160;do { ++(n)-&gt;mib2_counters.x; } while(0)</td></tr>
<tr class="separator:ga3c52caf566d37705c6547f2d025afd9f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga05641438775014b7e13b9e55eba48bed"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__netif__mib2.html#ga05641438775014b7e13b9e55eba48bed">MIB2_STATS_NETIF_ADD</a>(n,  x,  val)&#160;&#160;&#160;do { (n)-&gt;mib2_counters.x += (val); } while(0)</td></tr>
<tr class="separator:ga05641438775014b7e13b9e55eba48bed"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5be1b8cba1d67bf6e7f8851ec91b10f0"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__netif__mib2.html#ga5be1b8cba1d67bf6e7f8851ec91b10f0">MIB2_INIT_NETIF</a>(<a class="el" href="structnetif.html">netif</a>,  type,  speed)</td></tr>
<tr class="separator:ga5be1b8cba1d67bf6e7f8851ec91b10f0"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:ga15378b8dcd2a9dc2985142d864a767ba"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__netif__mib2.html#ga15378b8dcd2a9dc2985142d864a767ba">snmp_ifType</a> </td></tr>
<tr class="separator:ga15378b8dcd2a9dc2985142d864a767ba"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<h2 class="groupheader">Macro Definition Documentation</h2>
<a id="ga5be1b8cba1d67bf6e7f8851ec91b10f0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga5be1b8cba1d67bf6e7f8851ec91b10f0">&#9670;&nbsp;</a></span>MIB2_INIT_NETIF</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define MIB2_INIT_NETIF</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><a class="el" href="structnetif.html">netif</a>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">type, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">speed&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<b>Value:</b><div class="fragment"><div class="line"><span class="keywordflow">do</span> { \</div><div class="line">  (<a class="code" href="structnetif.html">netif</a>)-&gt;<a class="code" href="structnetif.html#ad0ee2a2169e384a2977ece2c471e0062">link_type</a> = (type);  \</div><div class="line">  (<a class="code" href="structnetif.html">netif</a>)-&gt;<a class="code" href="structnetif.html#a908452e854180941054ed89f52bb8094">link_speed</a> = (speed);\</div><div class="line">  (<a class="code" href="structnetif.html">netif</a>)-&gt;<a class="code" href="structnetif.html#a1bb4e3aed6e0fd4b6b31ee82d806f971">ts</a> = 0;              \</div><div class="line">  (<a class="code" href="structnetif.html">netif</a>)-&gt;<a class="code" href="structnetif.html#ab32cbe1851154fd020bac4be558f5fd5">mib2_counters</a>.<a class="code" href="structstats__mib2__netif__ctrs.html#a7e9ddf9b4a17748a9d3f041c1d24ba8e">ifinoctets</a> = 0;      \</div><div class="line">  (<a class="code" href="structnetif.html">netif</a>)-&gt;mib2_counters.ifinucastpkts = 0;   \</div><div class="line">  (<a class="code" href="structnetif.html">netif</a>)-&gt;<a class="code" href="structnetif.html#ab32cbe1851154fd020bac4be558f5fd5">mib2_counters</a>.<a class="code" href="structstats__mib2__netif__ctrs.html#a111f08290b3c6944108237cefba066dd">ifinnucastpkts</a> = 0;  \</div><div class="line">  (<a class="code" href="structnetif.html">netif</a>)-&gt;mib2_counters.ifindiscards = 0;    \</div><div class="line">  (<a class="code" href="structnetif.html">netif</a>)-&gt;<a class="code" href="structnetif.html#ab32cbe1851154fd020bac4be558f5fd5">mib2_counters</a>.<a class="code" href="structstats__mib2__netif__ctrs.html#afda1a14dc79bb65a33f97f9fb467ec1d">ifinerrors</a> = 0;    \</div><div class="line">  (<a class="code" href="structnetif.html">netif</a>)-&gt;mib2_counters.ifinunknownprotos = 0;    \</div><div class="line">  (<a class="code" href="structnetif.html">netif</a>)-&gt;<a class="code" href="structnetif.html#ab32cbe1851154fd020bac4be558f5fd5">mib2_counters</a>.<a class="code" href="structstats__mib2__netif__ctrs.html#a24151d13a55452518e5f7832f48bd5a7">ifoutoctets</a> = 0;     \</div><div class="line">  (<a class="code" href="structnetif.html">netif</a>)-&gt;mib2_counters.ifoutucastpkts = 0;  \</div><div class="line">  (<a class="code" href="structnetif.html">netif</a>)-&gt;<a class="code" href="structnetif.html#ab32cbe1851154fd020bac4be558f5fd5">mib2_counters</a>.<a class="code" href="structstats__mib2__netif__ctrs.html#afd3264670c39cc0d721a35cb6650f8d7">ifoutnucastpkts</a> = 0; \</div><div class="line">  (<a class="code" href="structnetif.html">netif</a>)-&gt;mib2_counters.ifoutdiscards = 0; \</div><div class="line">  (<a class="code" href="structnetif.html">netif</a>)-&gt;<a class="code" href="structnetif.html#ab32cbe1851154fd020bac4be558f5fd5">mib2_counters</a>.<a class="code" href="structstats__mib2__netif__ctrs.html#a91b60bb78759c9b655a74bb4fae3346e">ifouterrors</a> = 0; } <span class="keywordflow">while</span>(0)</div><div class="ttc" id="structstats__mib2__netif__ctrs_html_a24151d13a55452518e5f7832f48bd5a7"><div class="ttname"><a href="structstats__mib2__netif__ctrs.html#a24151d13a55452518e5f7832f48bd5a7">stats_mib2_netif_ctrs::ifoutoctets</a></div><div class="ttdeci">u32_t ifoutoctets</div><div class="ttdef"><b>Definition:</b> stats.h:212</div></div>
<div class="ttc" id="structstats__mib2__netif__ctrs_html_a111f08290b3c6944108237cefba066dd"><div class="ttname"><a href="structstats__mib2__netif__ctrs.html#a111f08290b3c6944108237cefba066dd">stats_mib2_netif_ctrs::ifinnucastpkts</a></div><div class="ttdeci">u32_t ifinnucastpkts</div><div class="ttdef"><b>Definition:</b> stats.h:194</div></div>
<div class="ttc" id="structnetif_html_ad0ee2a2169e384a2977ece2c471e0062"><div class="ttname"><a href="structnetif.html#ad0ee2a2169e384a2977ece2c471e0062">netif::link_type</a></div><div class="ttdeci">u8_t link_type</div><div class="ttdef"><b>Definition:</b> netif.h:361</div></div>
<div class="ttc" id="structnetif_html_a1bb4e3aed6e0fd4b6b31ee82d806f971"><div class="ttname"><a href="structnetif.html#a1bb4e3aed6e0fd4b6b31ee82d806f971">netif::ts</a></div><div class="ttdeci">u32_t ts</div><div class="ttdef"><b>Definition:</b> netif.h:365</div></div>
<div class="ttc" id="structstats__mib2__netif__ctrs_html_a91b60bb78759c9b655a74bb4fae3346e"><div class="ttname"><a href="structstats__mib2__netif__ctrs.html#a91b60bb78759c9b655a74bb4fae3346e">stats_mib2_netif_ctrs::ifouterrors</a></div><div class="ttdeci">u32_t ifouterrors</div><div class="ttdef"><b>Definition:</b> stats.h:228</div></div>
<div class="ttc" id="structstats__mib2__netif__ctrs_html_afd3264670c39cc0d721a35cb6650f8d7"><div class="ttname"><a href="structstats__mib2__netif__ctrs.html#afd3264670c39cc0d721a35cb6650f8d7">stats_mib2_netif_ctrs::ifoutnucastpkts</a></div><div class="ttdeci">u32_t ifoutnucastpkts</div><div class="ttdef"><b>Definition:</b> stats.h:220</div></div>
<div class="ttc" id="structnetif_html"><div class="ttname"><a href="structnetif.html">netif</a></div><div class="ttdef"><b>Definition:</b> netif.h:260</div></div>
<div class="ttc" id="structnetif_html_a908452e854180941054ed89f52bb8094"><div class="ttname"><a href="structnetif.html#a908452e854180941054ed89f52bb8094">netif::link_speed</a></div><div class="ttdeci">u32_t link_speed</div><div class="ttdef"><b>Definition:</b> netif.h:363</div></div>
<div class="ttc" id="structstats__mib2__netif__ctrs_html_afda1a14dc79bb65a33f97f9fb467ec1d"><div class="ttname"><a href="structstats__mib2__netif__ctrs.html#afda1a14dc79bb65a33f97f9fb467ec1d">stats_mib2_netif_ctrs::ifinerrors</a></div><div class="ttdeci">u32_t ifinerrors</div><div class="ttdef"><b>Definition:</b> stats.h:203</div></div>
<div class="ttc" id="structnetif_html_ab32cbe1851154fd020bac4be558f5fd5"><div class="ttname"><a href="structnetif.html#ab32cbe1851154fd020bac4be558f5fd5">netif::mib2_counters</a></div><div class="ttdeci">struct stats_mib2_netif_ctrs mib2_counters</div><div class="ttdef"><b>Definition:</b> netif.h:367</div></div>
<div class="ttc" id="structstats__mib2__netif__ctrs_html_a7e9ddf9b4a17748a9d3f041c1d24ba8e"><div class="ttname"><a href="structstats__mib2__netif__ctrs.html#a7e9ddf9b4a17748a9d3f041c1d24ba8e">stats_mib2_netif_ctrs::ifinoctets</a></div><div class="ttdeci">u32_t ifinoctets</div><div class="ttdef"><b>Definition:</b> stats.h:188</div></div>
</div><!-- fragment --><p>Init MIB2 statistic counters in netif </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">netif</td><td>Netif to init </td></tr>
    <tr><td class="paramname">type</td><td>one of enum <a class="el" href="group__netif__mib2.html#ga15378b8dcd2a9dc2985142d864a767ba">snmp_ifType</a> </td></tr>
    <tr><td class="paramname">speed</td><td>your link speed here (units: bits per second) </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga05641438775014b7e13b9e55eba48bed"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga05641438775014b7e13b9e55eba48bed">&#9670;&nbsp;</a></span>MIB2_STATS_NETIF_ADD</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define MIB2_STATS_NETIF_ADD</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">n, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">x, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">val&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td>&#160;&#160;&#160;do { (n)-&gt;mib2_counters.x += (val); } while(0)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Add value to stats member for SNMP MIB2 stats (struct <a class="el" href="structstats__mib2__netif__ctrs.html">stats_mib2_netif_ctrs</a>) </p>

</div>
</div>
<a id="ga3c52caf566d37705c6547f2d025afd9f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga3c52caf566d37705c6547f2d025afd9f">&#9670;&nbsp;</a></span>MIB2_STATS_NETIF_INC</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define MIB2_STATS_NETIF_INC</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">n, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">x&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td>&#160;&#160;&#160;do { ++(n)-&gt;mib2_counters.x; } while(0)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Increment stats member for SNMP MIB2 stats (struct <a class="el" href="structstats__mib2__netif__ctrs.html">stats_mib2_netif_ctrs</a>) </p>

</div>
</div>
<h2 class="groupheader">Enumeration Type Documentation</h2>
<a id="ga15378b8dcd2a9dc2985142d864a767ba"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga15378b8dcd2a9dc2985142d864a767ba">&#9670;&nbsp;</a></span>snmp_ifType</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group__netif__mib2.html#ga15378b8dcd2a9dc2985142d864a767ba">snmp_ifType</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="section see"><dt>See also</dt><dd>RFC1213, "MIB-II, 6. Definitions" </dd></dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
  </ul>
</div>
</body>
</html>
